//
//  XMUserDetailMoreView.m
//  XunMi
//
//  Created by MacBook on 2024/2/26.
//  Copyright © 2024 TieZhu. All rights reserved.
//

#import "XMUserDetailMoreView.h"

@interface XMUserDetailMoreView ()
@property (weak, nonatomic) IBOutlet UIView *bgView;

@end

@implementation XMUserDetailMoreView

- (void)layoutSubviews {
    [super layoutSubviews];
    // 设置左上和右上角为圆角
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bgView.bounds
                                                   byRoundingCorners:(UIRectCornerTopLeft | UIRectCornerTopRight)
                                                         cornerRadii:CGSizeMake(20.0, 20.0)];
    
    CAShapeLayer *maskLayer = [CAShapeLayer layer];
    maskLayer.frame = self.bgView.bounds;
    maskLayer.path = maskPath.CGPath;
    self.bgView.layer.mask = maskLayer;

}

- (IBAction)btnAct:(UIButton *)sender {
    if (self.clickBlock) {
        self.clickBlock(sender.tag);
    }
}


@end
